# $Id$
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=gajim
pkgver=0.16.8
pkgrel=2
pkgdesc="A full featured and easy to use Jabber client"
arch=('any')
url="https://www.gajim.org/"
license=('GPL3')
depends=('pygtk' 'python2-pyopenssl' 'python2-pyasn1' 'python2-nbxmpp' 
         'ca-certificates' 'ldns' 'desktop-file-utils')
makedepends=('intltool')
optdepends=('python2-dbus: dbus support'
            'gtkspell: for spelling support'
            'libxss: for idle module'
            'notification-daemon: for desktop notification'
            'python2-gnomekeyring: for GnomeKeyring support'
            'python2-crypto: support for E2E encryption'
            'python2-docutils: for RST generator support'
            'gupnp-igd: for UPnP-IGD support'
            'python2-gnupg: for PGP encryption')
source=(https://www.gajim.org/downloads/${pkgver%.*}/gajim-${pkgver}.tar.bz2 gajim-drill.patch)
sha1sums=('ec478488d25097661d76c6e0f9fe28415b7a4580'
          '6c93159d7018675e4747a0d4c0ca43bb559a4dc0')

prepare() {
  cd ${pkgname}-${pkgver}
  patch -p1 -i "${srcdir}/gajim-drill.patch"
}

build() {
  cd ${pkgname}-${pkgver}
  PYTHON=python2 ./configure --prefix=/usr --enable-site-packages
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
